home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 19
/
Mac Magazin and MacEasy Magazine CD - Issue 19.iso
/
Grafik & Text & Film
/
Quark XTensions
/
Freeware Xtensions
/
XPress Scripts 1.0
/
Make Pages as EPS
/
Make Pages as EPS
next >
Wrap
Text File
|
1994-08-11
|
3KB
|
78 lines
tell application "QuarkXPress 3.3"
activate
if document 1 exists then
tell document 1
set docName to the name
set pageNum to the count of pages
if pageNum < 10 then
set fileNameLength to 25
else if pageNum < 100 then
set fileNameLength to 24 --thanks to Quark Inc. for the file name length
else if pageNum < 1000 then --routine, from "Save Pages as EPS" script, from "Quark AppleScript Scripts"
set fileNameLength to 23
else
set fileNameLength to 22
end if
copy (display dialog "Make EPS files from document" & return & "'" & docName & ¬
"' with pages:" buttons {"Cancel", "All pages", "Selective..."} default button 2 with icon 2000) to x
do updates
if button returned of x is "Selective..." then
copy (display dialog "Enter pages:" default answer "" with icon 2001) to dlog2
if (count of characters in docName) ≤ fileNameLength then
copy (choose folder with prompt " Save Pages as EPS files to:") to hardDisk
do updates
end if
copy text returned of dlog2 to dlog2Text
copy every character of dlog2Text as list to y
try
repeat with i from 1 to count of items in y
if item i of y = "," then
set item i of y to " "
end if
end repeat
copy y as text to y
set view scale to "100%"
repeat with i from 1 to count of words in y
copy word i of y to z
save page z ¬
EPS format Mac Color ¬
include preview ¬
"true" EPS data binary EPS OPI ¬
include images ¬
in ("" & hardDisk & docName & ".eps/" & z)
end repeat
display dialog "Make EPS files done." buttons {" Okay "} default button 1 with icon 2001
do updates
on error errMsg
beep
display dialog "Invalid entry. ‘" & dlog2Text & "’ cannot be used." buttons {" Okay "} default button 1 with icon 2
do updates
end try
else if button returned of x is "All pages" then
if (count of characters in docName) ≤ fileNameLength then
copy (choose folder with prompt " Save Pages as EPS files to:") to hardDisk
do updates
end if
set view scale to "100%"
repeat with i from 1 to pageNum
save page i ¬
EPS format Mac Color ¬
include preview ¬
"true" EPS data binary EPS ¬
OPI include images ¬
in ("" & hardDisk & docName & ".eps/" & i)
end repeat
display dialog "Make EPS files done." buttons {" Okay "} default button 1 with icon 2001
do updates
else
display dialog "The name '" & docName & "' is too long for use by this script." buttons "OK" default button 1 with icon 0
do updates
end if
end tell
else
beep
display dialog "This script requires an" & return & "open QuarkXPress document." buttons "OK" default button 1 with icon 1
do updates
end if
end tell